/**
 * @description DOM 节点相关函数
 */
/**
 * @description 获取 DOM 节点的布局信息
 * @param {string} selector 选择器
 * @param {object} instance 实例
 * @returns {Promise} Promise.then(data)
 */
export function getDOMRect(selector, instance) {
    return new Promise((resolve, reject) => {
        const query = uni.createSelectorQuery().in(instance);
        query
            .select(selector)
            .boundingClientRect((data) => {
                resolve(data);
            })
            .exec();
    });
}
